1. Field of the Invention
The present invention relates to a video and audio multiplex recording apparatus in which, particularly, the audio data can be easily re-written, and which is used for, for example, a re-writable digital video disk player (hereinafter, referred to as DVD-RW) in which the video data and the audio data recorded in a recording medium can be re-written.
2. Description of the Related Art
FIG. 2 is a schematic structural view showing an example of the conventional video and audio multiplex recording apparatus.
This video and audio multiplex recording apparatus has an MPEG coding device 1. The MPEG coding device 1 converts an analog video input signal Svi and an analog audio input signal Sai respectively into the digital compression video data and the digital compression audio data and multiplexes them according to, for example, an MPEG2 (Motion Picture Experts Group Phase 2) system, and generates the multiplexing data S1 and outputs it. A personal computer 2 to convert the multiplexing data S1 into the multiplexing data S2 with a predetermined format and output it, is connected to the output side of the MPEG coding device 1. A hard disk driver (hereinafter, referred to as HDD) 3 to record the multiplexing data S2 is connected to the output side of the personal computer 2.
FIG. 3 is a typical view showing an example of the data structure of the multiplexing data S1 in FIG. 2.
Referring to the view, operations of FIG. 2 will be described.
The video input signal Svi and the audio input signal Sai are inputted into the MPEG coding device 1. In the case where the standard of the video input signal Svi is the standard of, for example, the NTSC (National Television System Committee) and a frame frequency is 29.97 Hz, when the video input signal Svi is converted into the digital data, because the signal is coded for each frame unit according to the MPEG2 system, the coded video data has a unit of 33.6 ms (=1/29.97 Hz). In this video data, 1 group (1 Group of Picture, hereinafter referred to as 1GOP) is composed of 3 kinds of images of the I picture (Intra-Picture, Intra-frame coding image), the P picture (Predictive-Picture, Between frame forward predictive coding image) and the B picture (Bidirectionary-Predictive-Picture, Bidirectionary predictive coding image). When the audio input signal Sai is converted into the digital data, 1 audio frame is composed of 1536 samples, and is compressed according to the MPEG2 system or the AC-3 standard. The width of time of 1 audio frame is 32 ms when a sampling frequency is, for example, 48 kHz, and after compression, it is the audio data of the fixed length code which is the AAU (Audio Access Unit). The length is, for example, 768 bytes at 192 kbps.
When these video data and audio data are multiplexed, because the compression of the video data by the MPEG2 system is by the variable-length code, the video data for one frame is dispersed into a plurality of video packs (hereinafter, referred to as V_PCK), and the audio data for one audio frame is dispersed into a plurality of audio packs (hereinafter, referred to as A_PCK). Then, a plurality of V_PCK and a plurality of A_PCK are multiplexed, and a stream of the multiplexing data S1 is generated. A plurality of the AAU are multiplexed in the A_PCK.
In the multiplexing data S1, in one VOBU (Video Object Unit), one A_PCK is allotted to several V_PCKs. Each V_PCK has, for example, a capacity of 2048 bytes, and is composed of a pack header (Pack Header) in which an additional information for time base reference for the synchronous reproducing is stored, a system header (System Header) in which an outline of overall stream of the multiplexing data S1 is stored, a packet header (Packet Header) in which the attribute of the video data is stored, and a video data (Video Data). Each A_PCK has, for example, a capacity of 2048 bytes, and is composed of a pack header (Pack Header) which is the same as the V_PCK, a packet header (Packet Header) in which the attribute of the audio data is stored, and an audio data (Audio Data). The audio data is composed of a plurality of AAUs (Audio Access Unit) as a payload of A_PCK. The multiplexing data S1 is sent from the MPEG coding device 1 to the personal computer 2, and from the personal computer 2, the multiplexing data S2 suitable to the format of the HDD 3 is outputted. The multiplexing data S2 is recorded in the HDD 3 as a file.
However, in the conventional video and audio multiplex recording apparatus in FIG. 2, there are problems as the followings.
In the video and audio multiplex recording apparatus in FIG. 2, the multiplexing data S1 has the data structure as shown in FIG. 3, and because the width of time of one AAU is 32 ms, the width of time (=0.5005 s) of one VOBU is not its integer times. Further, the capacity of A_PCK is 2048 bytes, and its payload is not integer times of AAU (768 bytes/at the time of 192 kbps). Therefore, the audio data (that is AAU) in the A_PCK which is multiplexed in one VOBU, is not only the corresponding audio data of VOBU, accordingly, the correspondence of the audio data to the video data in the file is not definite, and there is a problem that it is difficult to re-record only the audio data later (for example, audio insert). Further, even when another audio data is overwritten onto the audio data at some position by some means, because the data structure at the start point of the overwrite is discontinuous, the decode faulty occurs at the time of reproduction, and there is a case where noises occur. In this case, because it is impossible to eliminate only the noise, it is necessary to eliminate whole reproducing sound, and there is a problem that a high quality audio compilation can not be conducted.
In order to solve the problems, according to a first aspect of the present invention, there is provided a video and audio multiplex recording apparatus, comprising: video signal compression means for inputting digital video data and forming a unit video block for each of predetermined frame numbers, and by compressing the video data included in each unit video block by a first compression rate and packaging it by a predetermined information amount unit, for generating and outputting compression video data; audio signal compression means for inputting digital audio data and forming a unit audio block for each of predetermined sample numbers, and by compressing the audio data included in each unit audio block by a second compression rate and packaging it by a predetermined information amount unit, for generating and outputting compression audio data; multiplexing means for time-division-multiplexing the compression video data and the compression audio data according to a control signal, and generating and outputting multiplexing data; an encoder for encoding the multiplexing data by a predetermined encoding system, and generating and outputting encode data; recording means for recording the encode data in a recording medium; and control means including memory means for storing an allocation table in which the unit video block and the unit audio block are allocated, according to a least integer ratio which is a ratio of the number of the unit video blocks and the number of the unit audio blocks when a least common multiple of a cycle period of the unit video block and that of the unit audio block is obtained, for generating and outputting the control signal according to the allocation table.
According to a second aspect of the present invention, there is provided a video and audio multiplex recording apparatus, comprising: video signal compression means for inputting digital first video data and forming a unit video block for each of predetermined frame numbers, and by compressing the first video data included in each unit video block by a first compression rate and packaging it by a predetermined information amount unit, for generating and outputting compression video data; audio signal compression means for inputting digital first audio data and forming a unit audio block for each of predetermined sample numbers, and by compressing the first audio data included in each unit audio block by a second compression rate and packaging it by a predetermined information amount unit, for generating and outputting compression audio data; multiplexing means for time-division-multiplexing the compression video data and the compression audio data according to a control signal, and generating and outputting the multiplexing data, or for time-division-multiplexing the compression audio data and supplied second video data according to the control signal, and generating and outputting the multiplexing data; an encoder for encoding the multiplexing data by a predetermined encoding system, and generating and outputting encode data; recording and reproducing means for recording the encode data in a recording medium, and for reproducing the encode data recorded in the recording medium and outputting reproducing data; a decoder for decoding the reproducing data by a decode system corresponding to the predetermined encode system, and generating and outputting decode data; separation means for inputting the decode data and separating it into the second video data and second audio data and outputting them; operation means for outputting a designation signal for designating an audio insert operation to re-write the data corresponding to the compression audio data in the encode data recorded in the recording medium, according to the operation of an operator; and control means including memory means for storing an allocation table in which the unit video block and the unit audio block are allocated, according to a least integer ratio which is a ratio of the number of the unit video blocks and the number of the unit audio blocks when a least common multiple of a cycle period of the unit video block and that of the unit audio block is obtained, for generating and outputting the control signal for time-division-multiplexing the compression audio data and the second video data according to the allocation table, when the audio insert operation is designated according to the designation signal.